<?php
	require_once('Sqlite/DB.php');
	$db = openDB('Sqlite/myDatabase');

	$marca = $_GET['marca'];
	echo $marca;
	echo '<option value="Modelo" selected="selected">Modelo</option>';
	if($marca=="Marca"){		
		$table=queryDB($db,"SELECT Modelo FROM Motos");
		while($row=getRow($table)){
			echo '<option value="'. $row['Modelo'].'">'.$row['Modelo'].'</option>';	
		}
	}
	else{
		$table=queryDB($db,'SELECT Modelo FROM Motos WHERE Marca="'.$_GET['marca'].'"');
		while($row=getRow($table)){
			echo '<option value="'. $row['Modelo'].'">'.$row['Modelo'].'</option>';	
		}
	}		
?>